package bat.iog.hytool.ftp.demo1;

import java.io.IOException;

public class Client {

    /*public static void main(String[] args) throws IOException {
        ContinueFTP ftp = new ContinueFTP();

        System.out.println("<<<<<<<<<<<<<<<<<1"+ftp.getFtpClient().isConnected());
        ftp.connect("127.0.0.1", 21, "user", "root");
        System.out.println("<<<<<<<<<<<<<<<<<3"+ftp.getFtpClient().isConnected());
        ftp.getFtpClient().disconnect();
    }*/

    public static void main(String[] args) {
        ContinueFTP ftp = new ContinueFTP();
        try {
            ftp.connect("172.20.139.217", 21, "ftp01", "ftp111");
            FileOperateByFtp fileOperateByFtp = new FileOperateByFtp(ftp.getFtpClient());
            fileOperateByFtp.upload("F:\\upload7.temp","/upload2/f3/upload7.temp");
            fileOperateByFtp.upload("F:\\upload6.temp","/upload2/f3/upload6.temp");
           /* fileOperateByFtp.download("/upload2/f3/upload7.temp","F:\\upload6.temp");
            fileOperateByFtp.download("//upload2/f3/upload6.temp","F:\\upload7.temp");*/
            if(ftp.getFtpClient() != null){
                ftp.getFtpClient().disconnect();
            }
        } catch (Exception e) {
            if(e instanceof CreateException){
                System.out.println(((CreateException) e).getErrMessage());
            }
        }

    }
    
}
